<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015-08-24
 * Time: 20:19
 */
class b2c_ctl_wap_editdata extends b2c_ctl_wap_common{
    function __construct(&$app) {
        parent::__construct($app);
        $shopname = app::get('wap')->getConf('wap.name');
        $this->shopname =$shopname;
        if(isset($shopname)){
            $this->title = app::get('b2c')->_('樱淘社').$shopname;
            $this->keywords = app::get('b2c')->_('樱淘社').$shopname;
            $this->description = app::get('b2c')->_('樱淘社').$shopname;
        }
        $this->action = $this->_request->get_act_name();
        if(!$this->action) $this->action = 'index';
        $this->pagedata['res_url'] = $this->app->res_url;
        /** end **/
    }

    function index() {
        $input['method'] = array("file"=>"mobileapi_rpc_goods","action"=>"get_member_info");
        $input['data'] = array("member_id"=>$this->get_current_member());
        $res = $this->getApi($input);
        $arr = kernel::single('b2c_mdl_members')->dump(array('member_id'=>$this->get_current_member()),'addr');
        $this->pagedata['logo'] = '个人资料';
        $this->pagedata['name'] = $res['data']['name'];
        $this->pagedata['sex'] = $res['data']['sex'];
        $this->pagedata['avatar'] = $res['data']['avatar'];
        $this->pagedata['desc'] = $res['data']['desc'];
        $this->pagedata['addr'] = $arr['addr'];
        $this->page('wap/editdata/index.html');
    }
}